#include"comm.hpp"


int main()
{
   
//获取id
    int shmid=GetShm();
    //挂接
    char* shmadrr=(char*)shmat(shmid,NULL,0);  
    //通信code
    int fd=open(FIFO_FILE,O_WRONLY);
    if(fd<0)
    {
        log(Fatal,"open err:%s",strerror(errno));
        exit(3);
    }
    while(true)
    {
        printf("Please Enter@ ");
        fgets(shmadrr,4096,stdin);
        write(fd,"c",1); //通知对方

    }
    //取消挂接
    shmdt(shmadrr);
    close(fd);
    return 0;
}